document.observe("dom:loaded", function() {
  function hideMainDivs() {
      $('cars').hide();
      $('vendors').hide();
      $('gas-purchases').hide();
      $('services-and-repairs').hide();
  }

  $$('span.selector').invoke('observe','click',function(e) {
      var btn = Event.element(e);
      var target = btn.innerHTML;
      target = target.replace(/ /g,'-');
      // alert(target);
      hideMainDivs();
      $(target).show();
  });
})
